package ace.module.mail.address.api.model.input;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author caspar
 * @date 2023/3/20 9:12
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MadAppOutInfoInput {

  @NotEmpty
  @Schema(title = "外部应用类型")
  private String outType;

  @NotEmpty
  @Schema(title = "外部应用id")
  private String outId;

  public static MadAppOutInfoInput of(String outType, String outId) {
    return MadAppOutInfoInput.builder().outType(outType).outId(outId).build();
  }

  public static MadAppOutInfoInput of(String outType, Long outId) {
    return MadAppOutInfoInput.builder().outType(outType).outId(outId.toString()).build();
  }
}
